package com.vallis.service.impl;

import com.vallis.mapper.CustomerMapper;
import com.vallis.model.Customer;
import com.vallis.service.CustomerService;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CustomerServiceImpl implements CustomerService {
@Autowired
private CustomerMapper customerMapper;

    @Override
    public Customer selectByPrimaryKey(Integer id) {
        return customerMapper.selectByPrimaryKey(id);
    }
	@Override
	public List<Customer> findAll() {
		// TODO Auto-generated method stub
		return customerMapper.findAll();
	}

	@Override
	public List<Customer> findMyAfter(int id) {
	
		return customerMapper.findMyAfter(id);
	}

	@Override
	public int deleteByPrimaryKey(Integer id) {
		// TODO Auto-generated method stub
		return customerMapper.deleteByPrimaryKey(id);
	}

	@Override
	public int insert(Customer record) {
		// TODO Auto-generated method stub
		return customerMapper.insert(record);
	}

	@Override
	public int insertSelective(Customer record) {
		// TODO Auto-generated method stub
		return customerMapper.insertSelective(record);
	}

	@Override
	public int updateByPrimaryKeySelective(Customer record) {
		// TODO Auto-generated method stub
		return customerMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKey(Customer record) {
		// TODO Auto-generated method stub
		return customerMapper.updateByPrimaryKey(record);
	}

	@Override
	public Customer login(String phone) {
		// TODO Auto-generated method stub
		return customerMapper.login(phone);
	}
	@Override
	public Customer findByCertNum(String cert) {
		// TODO Auto-generated method stub
		return customerMapper.findByCertNum(cert);
	}
}
